<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="">
	<meta name="author" content="">
	<title>订单评价</title>

	<link href="/static/css/bootstrap.min.css" rel="stylesheet">
	<link href="/static/css/animate.min.css" rel="stylesheet">
	<link href="/static/css/main.css" rel="stylesheet">
	<link href="/static/css/page.css" rel="stylesheet">
	<link href="/static/css/responsive.css" rel="stylesheet">
	<link href="/static/css/iconfont.css" rel="stylesheet" />

	<script src="/static/js/jquery.js"></script>
	<script src="/static/js/jquery-1.11.3.js"></script>
	<script src="/static/js/bootstrap.min.js"></script>
	<script src="/static/js/jquery.SuperSlide.js" type="text/javascript"></script>
	<script src="/static/js/NSW_Index.js"></script>

</head>
<!--/head-->


<body>
	<header id="header">
		<nav class="navbar navbar-inverse" role="banner">
			<div class="container">
				<div class="row">
					<div class="col-md-3 navbar-header">
						<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
						</button>
						<a class="navbar-brand" href="index.html"><img src="/static/images/logo.png" alt="logo"
								class="img-responsive"></a>
					</div>
					<div class="col-md-9">
						<div class="tel">24小时服务热线：<span>0755-29961998</span></div>
						<div class="collapse navbar-collapse navbar-right">
							<ul class="nav navbar-nav">
								<li><a href="http://127.0.0.1:8000/publish/model_view/">订单类型</a></li>
								<li><a href="http://127.0.0.1:8000/order/order_list_view/">我的订单</a></li>
								<li class="active"><a href="http://127.0.0.1:8000/evaluation/list_view/">我的评价</a></li>
								<li><a href="http://127.0.0.1:8000/user/user_view/">我的信息</a></li>

							</ul>
						</div>
					</div>
				</div>
			</div>
		</nav>
	</header>

	<!--banner-->
	<div class="banner2">
		<p style="background:url(/static/images/about.png) no-repeat center; background-size:cover;"></p>
	</div>
	<div class="clearfix"></div>
	<section class="container">
		<div class="head">客户评价<span>Customer evaluation</span></div>
		<!-- 客户留言 -->
		<div class="leave">
			<ul>
				<li>
					<div class="fl"><img src="/static/images/20170306123521.jpg">
						<p>用户评价</p>
					</div>
					<div class="fm">
						<div>
								<span>订单编号:</span>
								<span id="order_code">{{ order_code }}</span>
								<span>输入评价:</span>
								<textarea id="content" class="u_text" name="" cols="30" rows="10" placeholder="输入评价" ></textarea>
								<span>反馈电话:(选填)</span>
								<input id="phone" class="u_text" type="text" placeholder="手机号">
							</div>
							<br><br>
							<div>
								<input id="submit" class="u_save" type="button" value="提交">
							</div>
					</div>
					<script>
						token = window.localStorage.getItem('moh_token');
						username = window.localStorage.getItem('moh_user');
						if (!username) {
							alert("请先登录")
							window.location.href = 'http://127.0.0.1:8000/user/login_view/';
						} else {
							$("#submit").on("click", function () {
								var order_code = $("#order_code").text()
								var phone = $("#phone").val()
								var content = $("#content").val()

								$.ajax({
									type: "post",
									url: "http://127.0.0.1:8000/evaluation/create_evaluation",
									data: JSON.stringify({
										"order_code": order_code,
										"phone": phone,
										"content": content,
									}),
									headers: { 'Content-Type': "application/json" },
									beforeSend: function (request) {
										request.setRequestHeader("Authorization", token);
									},
									success: function (data) {
										if (data.code == 200) {
											alert('提交成功！');
										} else {
											alert(data.error);
										}
									},
									error: function (e) {
										alert(data);
									}
								})
							})
						}
					</script>
				</li>
			</ul>
		</div>
		<div class="clearfix"></div>
	</section>
	<!-- 安全 Start -->
	<section class="service-v1">
		<div class="container">
			<div class="row">
				<div class="col-sm-4 col-md-4 col-lg-4">
					<div class="item">
						<div class="icon">
							<i class="iconfont">&#xe620;</i>
						</div>
						<div class="text">
							<div class="inner">
								<h3>正规公司，值得信赖</h3>
								<p>工商注册备案，安全可靠！</p>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4 col-md-4 col-lg-4">
					<div class="item">
						<div class="icon">
							<i class="iconfont">&#xe633;</i>
						</div>
						<div class="text">
							<div class="inner">
								<h3>安全保障，持证上岗</h3>
								<p>三证齐全（身份证，健康证，育婴师证）疾病排查，身份联网确认</p>
							</div>
						</div>
					</div>
				</div>
				<div class="col-sm-4 col-md-4 col-lg-4">
					<div class="item">
						<div class="icon">
							<i class="iconfont">&#xe614;</i>
						</div>
						<div class="text">
							<div class="inner">
								<h3>异地服务，更贴心</h3>
								<p>专注母婴护理，你在哪，我们的服务就在哪里</p>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>

	<!--footer-->
	<footer id="footer">
		<div class="container">
			<span>
				<a href="http://127.0.0.1:8000/publish/model_view/">订单类型 </a>
				<a href="http://127.0.0.1:8000/order/order_list_view/">我的订单</a>
				<a href="http://127.0.0.1:8000/evaluation/list_view/">我的评价</a>
				<a href="http://127.0.0.1:8000/user/user_view/">我的信息</a>
			</span>
			<span>联系地址：深圳宝安西乡街道兴业路西南侧碧海富通城1栋110 &nbsp;&nbsp; 联系方式：0755-29961998<br>
				Copyright © 2005-2023 All rights reserved. 京ICP备10012705号-8 </span>
		</div>
	</footer>
  
</body>

</html>